package zzuli.edu.cn.dao.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @ApiModel 注解用于实体类，表示对实体类进行说明
 * value: 实体类对象名称
 * description: 实体类的描述信息
 *
 * 注意：只有此对象作为返回值返回给前端时，此对象才会在页面上生成对应的Model，否则不会生成
 */
@ApiModel(value = "Student", description = "学生实体类")
@Data
public class Student {

    /**
     * @ApiModelProperty 注解作用于字段，表示对model的属性进行说明
     * name: 属性名
     * value: 属性描述
     * dataType: 数据类型
     * required: 属性是否必须
     * example: 样例数据
     * hidden: 是否隐藏 默认false(展示) true:隐藏
     */
    @ApiModelProperty(name = "name", value = "姓名", dataType = "String", required = true, example = "zhangsan", hidden = false)
    private String name;

    @ApiModelProperty(name = "age", value = "年龄", dataType = "int", required = true, example = "18", hidden = true)
    private int age;

    @ApiModelProperty(name = "sex", value = "性别", dataType = "String", required = true, example = "男", hidden = false)
    private String sex;

    public Student(String name, int age, String sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
    }
}
